Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set pushed image tag using starlark flag #3020

Merged
merged 2 commits into from
Dec 5, 2022
Merged

Set pushed image tag using starlark flag #3020

merged 2 commits into from
Dec 5, 2022

Conversation

bduffany
Copy link
Member

@bduffany bduffany commented Dec 5, 2022

Migrate from setting the version with --define=version=TAG to --//deployment:image_tag=TAG.

Unfortunately the analysis cache is still discarded when changing starlark flags (see bazelbuild/bazel#13591), but I figured since the docs say that "--define" is "legacy syntax" it's worth migrating to a starlark flag either way.


Version bump: Patch

deployment/BUILD Outdated
# container_push target can run at once.
string_flag(
name = "image_tag",
build_setting_default = "latest",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set this to something like dev? The flag should generally be set and if something accidentally doesn't specify it, I don't think we should default to touching the latest tag.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (used development instead of dev to avoid potential confusion with the dev environment)

@bduffany bduffany enabled auto-merge (squash) December 5, 2022 22:18
@bduffany bduffany merged commit 6a64d0d into master Dec 5, 2022
@bduffany bduffany deleted the tag-file branch December 5, 2022 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants